package pjwstk.jps.result;

/**
 * @author s9111_s10304
 *
 */
public class IntegerResult implements IIntegerResult
{
    private Integer value;

    public IntegerResult(int aValue) {
        value = aValue;
    }
    
    @Override
    public Integer getValue() {
        return value;
    }
    
    @Override
    public String toString() {
        return value.toString();
    }
    
    @Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ISimpleResult<?> other = (ISimpleResult<?>) obj;
		if (value == null) {
			if (other.getValue() != null)
				return false;
		} else if (!value.equals(other.getValue()))
			return false;
		return true;
	}
}